var express = require('express');
var router = express.Router();

const dao = require('../dao/index.js');

/* GET test listing. */
router.get('/', function(req, res, next) {
	let sql = 'select * from t_user'
	dao.query(sql).then(result=>{
		res.json({
			code: 0,
			msg: '查询成功',
			result
		})
	}).catch(e=>{
		res.send(e.toString())
	})
});

module.exports = router;
